import { get, post, del } from './request.js'

module.exports = {
  addReviewByBookId: function (id, params) {
    return post(`/comment/book/${id}/add`, params)
  },
  getReviewsByBookId: function (id, start = 0) {
    return get(`/comment/book/${id}/list?start=${start}`)
  },
  getReviewsByUserId: function (uid, start = 0) {
    return get(`/comment/user/${uid}/list?start=${start}`)
  },
  deleteReviewById: function (id) {
    return del(`/comment/${id}`)
  }
}
